<template>
  <div>
    <h2>礼成PC</h2>
    <button @click="test">测试</button>
    <p>
      {{ data }}
    </p>
  </div>
</template>

<script>
import { fetchHome } from '@/api/home';

export default {
  async asyncData({ app, error }) {
    const data = await fetchHome
      .call(app)
      .catch((e) => error({ statusCode: (e.response || {}).status || 500, message: e.message }));
    return {
      data,
    };
  },
  methods: {
    test() {
      this.$http({
        url: '/api/app-quan/v2/index2',
      }).then((res) => {
        console.log(res);
      });
    },
  },
};
</script>

<style>
</style>
